package com.ruoyi.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 全局配置类
 * 
 * @author ruoyi
 */
@Component
@ConfigurationProperties(prefix = "ruoyi")
public   class Global
{
    /** 项目名称 */
    private static String name;

    /** 版本 */
    private static String version;

    /** 版权年份 */
    private static String copyrightYear;

    /** 实例演示开关 */
    private static boolean demoEnabled;

    /** 上传路径 */
    private static String profile;

    /** 获取地址开关 */
    private static boolean addressEnabled;

    /** API 签名密钥 */
    private String secretKey;
    /** API 接口地址时效性 */
    private String timestamp;
    /** CC端API地址URL */
    private String ccServerUrl;

    /** 高德地图key 用于经纬度地址逆解析 */
    private String gaodeKey;

    /** 高德地图地理逆解析Api */
    private String gaodeApi;

    /** 图片访问地址 */
    private String picUrl;

    /** 百度AI 获取access token API地址 */
    private String baiduAuth;

    /** 百度AI 文字识别API地址 */
    private String baiduOcr;

    /** 地理解析 */
    private String gaodeAddress;

    /** API access token KEY */
    private String apiKey;

    /** 定时器开关 open开 close关 */
    private String timerSwitch;

    /** 默认密码 */
    private String defaultPw;
    
    /**
     * 工作开始时间
     */
    private static String workBeginTime;
    
    /**
     * 工作结束时间
     */
    private static String workEndTime;


    public String getGaodeApi() {
        return gaodeApi;
    }

    public void setGaodeApi(String gaodeApi) {
        this.gaodeApi = gaodeApi;
    }

    public String getCcServerUrl() {
        return ccServerUrl;
    }

    public void setCcServerUrl(String ccServerUrl) {
        this.ccServerUrl = ccServerUrl;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public static String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        Global.name = name;
    }

    public static String getVersion()
    {
        return version;
    }

    public void setVersion(String version)
    {
        Global.version = version;
    }

    public static String getCopyrightYear()
    {
        return copyrightYear;
    }

    public void setCopyrightYear(String copyrightYear)
    {
        Global.copyrightYear = copyrightYear;
    }

    public static boolean isDemoEnabled()
    {
        return demoEnabled;
    }

    public void setDemoEnabled(boolean demoEnabled)
    {
        Global.demoEnabled = demoEnabled;
    }

    public static String getProfile()
    {
        return profile;
    }

    public void setProfile(String profile)
    {
        Global.profile = profile;
    }

    public static boolean isAddressEnabled()
    {
        return addressEnabled;
    }

    public void setAddressEnabled(boolean addressEnabled)
    {
        Global.addressEnabled = addressEnabled;
    }

    public String getGaodeKey() {
        return gaodeKey;
    }

    public void setGaodeKey(String gaodeKey) {
        this.gaodeKey = gaodeKey;
    }

    public String getBaiduAuth() {
        return baiduAuth;
    }

    public void setBaiduAuth(String baiduAuth) {
        this.baiduAuth = baiduAuth;
    }

    public String getBaiduOcr() {
        return baiduOcr;
    }

    public void setBaiduOcr(String baiduOcr) {
        this.baiduOcr = baiduOcr;
    }

    public String getGaodeAddress() {
        return gaodeAddress;
    }

    public void setGaodeAddress(String gaodeAddress) {
        this.gaodeAddress = gaodeAddress;
    }

    public String getApiKey() {
        return apiKey;
    }

    public void setApiKey(String apiKey) {
        this.apiKey = apiKey;
    }

    public String getDefaultPw() {
        return defaultPw;
    }

    public void setDefaultPw(String defaultPw) {
        this.defaultPw = defaultPw;
    }

    /**
     * 获取头像上传路径
     */
    public static String getAvatarPath()
    {
        return getProfile() + "/avatar";
    }

    /**
     * 获取下载路径
     */
    public static String getDownloadPath()
    {
        return getProfile() + "/download/";
    }

    /**
     * 获取上传路径
     */
    public static String getUploadPath()
    {
        return getProfile() + "/upload";
    }

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }

    public String getTimerSwitch() {
        return timerSwitch;
    }

    public void setTimerSwitch(String timerSwitch) {
        this.timerSwitch = timerSwitch;
    }

	public static String getWorkBeginTime() {
		return workBeginTime;
	}

	public void setWorkBeginTime(String workBeginTime) {
		this.workBeginTime = workBeginTime;
	}

	public static String getWorkEndTime() {
		return workEndTime;
	}

	public void setWorkEndTime(String workEndTime) {
		this.workEndTime = workEndTime;
	}
    
}
